#include "../func.h"

int main()
{
    int fds[2];
    int fds1[2];
    int i;
    pipe(fds);
    pipe(fds1);
    if (!fork())
    {
        close(fds[1]);
        char buf[20] = {0};
        read(fds[0], buf, sizeof(buf));
        puts(buf);
        exit(0);
    }
    else
    {
        close(fds[0]);
        write(fds[1], "I am parent", 11);
        wait(NULL);
        return 0;
    }

    return 0;
}
